#include <iostream>
using std::cout;
using std::endl;
//设计一个求和案例，可以统计不同数据类型之间的加法运算
//int sum(Args ...args);
double sum(){
    return 0;
}
template <class T, class ...Args>
double sum(T t, Args ...args){
    return t + sum(args...);
}

void test(){
    cout << sum(1, 2, 3, 4, 5, 6, 7, 8, 9, 10.0) << endl;
    int a = 10;
    short b = 4;
    double c = 5.5;
    float d = 3.4;
    cout << sum(a, b, c, d) << endl;
}

int main()
{
    test();
    return 0;
}

